package com.imooc.sell.enums;

import lombok.Getter;

/**
 * The enum Result enum.
 *
 * @author YangYishe
 * @date 2021年09月07日 09:25
 */
@Getter
public enum ResultEnum {
    PARAM_ERROR(1,"参数错误"),
    PRODUCT_NOT_EXIST(10,"商品不存在"),
    PRODUCT_STOCK_ERROR(11,"商品库存数量不正确"),
    ORDER_NOT_EXIST(12,"订单不存在"),
    ORDER_DETAIL_NOT_EXIST(13,"订单明细不存在"),
    ORDER_STATUS_ERROR(21,"订单状态不正确"),
    ORDER_UPDATE_FAIL(22,"订单更新失败"),
    PAY_STATUS_ERROR(31,"支付状态不正确"),
    ORDER_OWNER_ERROR(32,"该订单不属于当前用户"),
    WX_MP_ERROR(41,"微信公众账号错误"),
    ;

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
